<template>
  <div>
           <el-divider content-position="center">最新公告</el-divider>
                <el-col :span="24">
                    <el-divider>系统通知</el-divider>
                    <el-collapse style="height: 300px;overflow-y: auto">
                        <el-collapse-item :title="item.name" v-for="item in noticeList" :key="item.id">
                            <div>发布时间：{{item.createTime}}</div>
                            <div>发布内容：{{item.content}}</div>
                            <div>发布用户：{{item.username}}</div>
                        </el-collapse-item>
                    </el-collapse>
                </el-col>
</template>

<script>
export default {
    name: "Notice",
    data(){
        return {
            noticeList:[]
        }
    },
    created() {
        this.request.get("/notice/list").then(res=>{
            this.noticeList=res.data
        })
    }
}
</script>

<style scoped>

</style>
